<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>销售结算单</title>
</head>

<style id="style1">
    table tr{
        height: 19pt;
    }
    td {height: 6.82mm;}
</style>

<script type="text/javascript" src="__STATIC__/js/lodop/LodopFuncs.js?v={:time()}"></script>
<body>
<p><a href="javascript:PreviewMytable();">打印预览</a></p>
<div id="header_1"  >
    <table border=0 width="100%" cellspacing="0" cellpadding="0" style="border-collapse:collapse" bordercolor="#000000">
        <caption style="height: 42pt;"><b style="float:left;"><img src="../../../../static/images/logo.jpg" /></b></caption>
        <caption><b style="font-size: 7.2mm;">销售结算单</b></caption>
        <tr>
            <td colspan="8" >
                <div style="text-align: right;padding: 5pt 30pt;" >
                    第<font tdata="PageNO" format="ChineseNum" color="blue">##</font>页</span>，共<font tdata="PageCount" format="ChineseNum" color="blue">##</font></span>页
                </div>
            </td>
        </tr>
        <tr>
            <td colspan="8" style="border-top: 1.5pt solid rgb(128,128,128);padding:1.5pt">
                <font >单位名称：<span>济南恭德陵园</span></font>
            </td>
        </tr>
        <tr>
            <td colspan="8">
                <div style="width: 33.3%;float:left;"><font >地&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;址：<span >济南市柳埠镇柳东村</span></font></div>
                <div style="width: 33.3%;float:left;"><font >电&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;话：<span>0531-82841666</span></font></div>
                <div style="width: 33.3%;float:left;"><font >传&nbsp;&nbsp;真：<span></span></font></div>
            </td>
        </tr>
        <tr>
            <td colspan="8" style="border-bottom: 1pt solid rgb(128,128,128);"><font >网&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;址：<span>www.sdgdly.com</span></font></td>
        </tr>
        <tr>
            <td colspan="8">
                <div style="width: 33.3%;float:left;"><font >客户姓名：<SPAN>{$result['buyer_name']}</SPAN></font> </div>
                <div style="width: 33.3%;float:left;"><font >证件类型：<SPAN>{:cart_type('cart',$result.cart_type)}</SPAN></font> </div>
                <div style="width: 33.3%;float:left;"><font >证件号码：<SPAN>{$result['customer_account']}</SPAN></font> </div>
            </td>
        </tr>
        <tr>
            <td colspan="8">
                <div style="width: 100%;float:left;"><font >联系地址：<SPAN>{$result['customer_address']}</SPAN></font></font> </div>
            </td>
        </tr>
        <tr>
            <td colspan="8">
                <div style="width: 33.3%;float:left;"><font >合同编号：<SPAN>{$result['contract_sn']}</SPAN></font> </div>
                <div style="width: 33.3%;float:left;"><font >墓位编号：<SPAN>{$result['tomb_num']}</SPAN></font> </div>
                <div style="width: 33.3%;float:left;"><font >具体位置：<SPAN>{$result['tomb_region']}</SPAN></font></div>
            </td>
        </tr>
        <tr>
            <td colspan="8">
                <div style="width: 33.3%;float:left;"><font >墓穴规制：<span>{$result['tomb_regulation_name']}</span></font></div>
                <div style="width: 33.3%;float:left;"><font >墓穴状态：<span>{$result['col_status_name']}</SPAN></span></font></div>
                <div style="width: 33.3%;float:left;"><font >操&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;作：<SPAN>购买</SPAN></font> </div>
            </td>
        </tr>
        <tr >
            <td colspan="8" style="border-bottom: 1.5pt solid rgb(128,128,128);border-top: 1pt solid rgb(128,128,128);padding: 2pt 0;">
                <font >购买结算：<span></span></font>
            </td>
        </tr>
        </thead>
    </table>
</div>
<div id="body_2">
    <TABLE border=0 width="100%" cellspacing="0" cellpadding="0" style="border-collapse:collapse" bordercolor="#000000">
        <thead>
        <TR>
            <td >序号</td>
            <td >项目名称</td>
            <td>数量</td>
            <td>单位</td>
            <td >单价(元)</td>
            <td >优惠</td>
            <td >金额(元)</td>
            <td >备注</td>
        </thead>
        <tbody>
            <td>1</td>
            <td >购墓</td>
            <td>1</td>
            <td>套</td>
            <td>{$result['selling_price']}</td>
            <td>{$result['selling_price']-$result['closing_price']}</td>
            <td>{$result['closing_price']}</td>
            <td >{$num_count}</td>
            <foreach name="goods" item="vo">
                <tr>
                    <td>{$key+2}</td>
                    <td >{$vo['goods_name']}</td>
                    <td>{$vo['num']}</td>
                    <td></td>
                    <td>{$vo['goods_price']}</td>
                    <td>{$vo['discount_price']}</td>
                    <td>{$vo['total_price']}</td>
                    <td ></td>
                </tr>
            </foreach>
        {$num_count}
        </tbody>
        <tfoot>
            <tr  >
                <td colspan="6" style="border-top: 1pt solid rgb(128,128,128)"><b>合计</b></td>
                <td colspan="2" style="border-top: 1pt solid rgb(128,128,128)" >￥<font tdata="subSum" format="#,##0.00" align="right"  tindex="7" > ###元</font></td>
            </tr>
        </tfoot>
    </TABLE>
</div>

<div id="tfoot_3">
    <div style="line-height: 20pt; border-top: 1pt solid rgb(128,128,128);" align=left ><font >质量保证</font></div>
    <div style="line-height: 20pt;border-top:  1px solid rgb(128,128,128);" align=left><font >1.客户验收购买的墓穴墓碑，质保期为  三 年。</font></div>
    <div style="line-height: 20pt" align=left><font > 2.质保期内凡产品质量问题包换包修，质保期从《墓穴安葬证》交付客户日之起计算。</font></div>
    <div style="line-height: 20pt" align=left><font > 3.墓穴管理维护期20年为一期，以首位逝者使用之日起计算。</font></div>
    <div style="line-height: 20pt;" align=left><font > 4.质保范围以墓碑原件为准，客户单独购买的附件不在质保范围之中。</font></div>
    <div style="line-height: 20pt;" align=left><font > 5.维保更换墓碑新构件/新产品执行   一 年质保期，原墓碑构件维修后不再执行质保。</font></div>
    <div style="line-height: 20pt;" align=left><font > 6.客户全款购墓不包含刻字、贴金、瓷像、落葬等费用与服务，请凭《墓穴安葬证》办理以上相关售后业务。</font></div>
    <div style="line-height: 20pt;border-bottom:  1pt solid rgb(128,128,128);" align=left><font >  注：   销售结算单打印，定金结算单作废</font></div>
    <div style="line-height: 25pt;border-bottom:  1.5pt solid rgb(128,128,128);" align=center>
        <div style="line-height: 25pt;width: 25%;float:left;"><font >经办人：<span>{$result.handle_name}</span></font></div>
        <div style="line-height: 25pt;width: 25%;float:left;"><font >收款人：<span>{$pay_user_name}</span></font></div>
        <div style="line-height: 25pt;width: 25%;float:left;"><font >客户签名：<span></span></font></div>
        <div style="line-height: 25pt;width: 25%;float:left;"><font >日期：<span>{$pay_time}</span></font></div>
    </div>
</div>

<script>
    function PreviewMytable(){
        var LODOP=getLodop();
        LODOP.PRINT_INITA("0mm","0mm","244.74mm","275.17mm","销售结算单");

        LODOP.SET_PRINTER_INDEX("EPSON LQ-520K ESC/P2");//指定打印机
        LODOP.SET_PRINT_PAGESIZE(0,0,0,"24.1*279.4-结算单");

        var strStyle="<style>"+document.getElementById("style1").innerHTML+"</style>";
        LODOP.ADD_PRINT_TABLE("211.5pt","7.5pt","95.892%","342.75pt",strStyle+document.getElementById("body_2").innerHTML);

        LODOP.ADD_PRINT_HTM("-4.5pt","7.5pt","95.892%","217.5pt",document.getElementById("header_1").innerHTML);
        LODOP.SET_PRINT_STYLEA(0,"ItemType",1);
        LODOP.SET_PRINT_STYLEA(0,"LinkedItem",1);
        LODOP.ADD_PRINT_HTM("554.25pt","7.5pt","95.892%","211.5pt",document.getElementById("tfoot_3").innerHTML);
        LODOP.SET_PRINT_STYLEA(0,"ItemType",1);
        LODOP.SET_PRINT_STYLEA(0,"LinkedItem",1);

        LODOP.SET_PREVIEW_WINDOW(0,1,0,900,700,"");//打印前弹出选择打印机的对话框
        LODOP.SET_PRINT_MODE("AUTO_CLOSE_PREWINDOW",1);//打印后自动关闭预览窗口
        if (LODOP.CVERSION) {
            CLODOP.On_Return=function(TaskID,Value){
                console.log(Value)
                if (Value)
                    alert("已发出实际打印命令！");
                else
                    alert("放弃打印！"); };
            LODOP.PREVIEW();
            return;
        };
        // LODOP.PREVIEW();
        // LODOP.PRINT_SETUP();//打印维护
        // LODOP.PRINT_DESIGN();//打印设计
    };
</script>


</body>
